import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  startstation: [{ required: true, message: "起始站点为必填项", trigger: "blur" }],
  endstation: [{ required: true, message: "终点站点为必填项", trigger: "blur" }],
  startangle: [{ required: true, message: "起始角度为必填项", trigger: "blur" }],
  endangle: [{ required: true, message: "终点角度为必填项", trigger: "blur" }],
  linetype: [{ required: true, message: "路段类型为必填项", trigger: "blur" }],
  radius: [{ required: true, message: "半径为必填项", trigger: "blur" }],
  status: [{ required: true, message: "状态为必填项", trigger: "change" }],
  direction: [{ required: true, message: "方向为必填项", trigger: "change" }],
  angle: [{ required: true, message: "角度为必填项", trigger: "change" }],
  detailList: [{ required: true, message: "路段详情为必填项", trigger: "change" }],
});
